﻿Module GUIModule
    Public Sub GUIImage(ByRef GuiItem As String, ByVal state As String)
        Select Case GuiItem

            '' Back Button actions to take depending on the variable for
            Case "back"
                If state = "enable" Then FormMain.pct01Back.Image = My.Resources.blue_01norm
                If state = "disable" Then FormMain.pct01Back.Image = My.Resources.blue_01nouse
                If state = "hover" Then
                    If FormMain.pct01Back.Enabled = True Then
                        FormMain.pct01Back.Image = My.Resources.blue_01glow 'Glow
                    Else
                        FormMain.pct01Back.Image = My.Resources.blue_01nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct01Back.Enabled = True Then
                        FormMain.pct01Back.Image = My.Resources.blue_01norm
                    Else
                        FormMain.pct01Back.Image = My.Resources.blue_01nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct01Back.Image = My.Resources.blue_01nouse

                If state = "mup" Then
                    If FormMain.pct01Back.Enabled = True Then
                        FormMain.pct01Back.Image = My.Resources.blue_01norm
                    Else
                        FormMain.pct01Back.Image = My.Resources.blue_01nouse
                    End If
                End If

                '' Stop Button actions to take depending on the variable 
            Case "stop"
                If state = "enable" Then FormMain.pct02Stop.Image = My.Resources.blue_02norm
                If state = "disable" Then FormMain.pct02Stop.Image = My.Resources.blue_02nouse
                If state = "hover" Then
                    If FormMain.pct02Stop.Enabled = True Then
                        FormMain.pct02Stop.Image = My.Resources.blue_02glow 'Glow
                    Else
                        FormMain.pct02Stop.Image = My.Resources.blue_02nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct02Stop.Enabled = True Then
                        FormMain.pct02Stop.Image = My.Resources.blue_02norm
                    Else
                        FormMain.pct02Stop.Image = My.Resources.blue_02nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct02Stop.Image = My.Resources.blue_02nouse

                If state = "mup" Then
                    If FormMain.pct02Stop.Enabled = True Then
                        FormMain.pct02Stop.Image = My.Resources.blue_02norm
                    Else
                        FormMain.pct02Stop.Image = My.Resources.blue_02nouse
                    End If
                End If

                '' Stop Button actions to take depending on the variable 
            Case "pause"
                If state = "enable" Then FormMain.pct03Pause.Image = My.Resources.blue_03norm
                If state = "disable" Then FormMain.pct03Pause.Image = My.Resources.blue_03nouse
                If state = "hover" Then
                    If FormMain.pct03Pause.Enabled = True Then
                        FormMain.pct03Pause.Image = My.Resources.blue_03glow 'Glow
                    Else
                        FormMain.pct03Pause.Image = My.Resources.blue_03nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct03Pause.Enabled = True Then
                        FormMain.pct03Pause.Image = My.Resources.blue_03norm
                    Else
                        FormMain.pct03Pause.Image = My.Resources.blue_03nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct03Pause.Image = My.Resources.blue_03nouse

                If state = "mup" Then
                    If FormMain.pct03Pause.Enabled = True Then
                        FormMain.pct03Pause.Image = My.Resources.blue_03norm
                    Else
                        FormMain.pct03Pause.Image = My.Resources.blue_03nouse
                    End If
                End If

                '' Stop Button actions to take depending on the variable 
            Case "play"
                If state = "enable" Then FormMain.pct04Play.Image = My.Resources.blue_04norm
                If state = "disable" Then FormMain.pct04Play.Image = My.Resources.blue_04nouse
                If state = "hover" Then
                    If FormMain.pct04Play.Enabled = True Then
                        FormMain.pct04Play.Image = My.Resources.blue_04glow 'Glow
                    Else
                        FormMain.pct04Play.Image = My.Resources.blue_04nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct04Play.Enabled = True Then
                        FormMain.pct04Play.Image = My.Resources.blue_04norm
                    Else
                        FormMain.pct04Play.Image = My.Resources.blue_04nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct04Play.Image = My.Resources.blue_04nouse

                If state = "mup" Then
                    If FormMain.pct04Play.Enabled = True Then
                        FormMain.pct04Play.Image = My.Resources.blue_04norm
                    Else
                        FormMain.pct04Play.Image = My.Resources.blue_04nouse
                    End If
                End If

                '' Stop Button actions to take depending on the variable 
            Case "next"
                If state = "enable" Then FormMain.pct05Next.Image = My.Resources.blue_05norm
                If state = "disable" Then FormMain.pct05Next.Image = My.Resources.blue_05nouse
                If state = "hover" Then
                    If FormMain.pct05Next.Enabled = True Then
                        FormMain.pct05Next.Image = My.Resources.blue_05glow 'Glow
                    Else
                        FormMain.pct05Next.Image = My.Resources.blue_05nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct05Next.Enabled = True Then
                        FormMain.pct05Next.Image = My.Resources.blue_05norm
                    Else
                        FormMain.pct05Next.Image = My.Resources.blue_05nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct05Next.Image = My.Resources.blue_05nouse

                If state = "mup" Then
                    If FormMain.pct05Next.Enabled = True Then
                        FormMain.pct05Next.Image = My.Resources.blue_05norm
                    Else
                        FormMain.pct05Next.Image = My.Resources.blue_05nouse
                    End If
                End If

                '' Stop Button actions to take depending on the variable 
            Case "file"
                If state = "enable" Then FormMain.pct06File.Image = My.Resources.blue_06norm
                If state = "disable" Then FormMain.pct06File.Image = My.Resources.blue_06nouse
                If state = "hover" Then
                    If FormMain.pct06File.Enabled = True Then
                        FormMain.pct06File.Image = My.Resources.blue_06glow 'Glow
                    Else
                        FormMain.pct06File.Image = My.Resources.blue_06nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct06File.Enabled = True Then
                        FormMain.pct06File.Image = My.Resources.blue_06norm
                    Else
                        FormMain.pct06File.Image = My.Resources.blue_06nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct06File.Image = My.Resources.blue_06nouse

                If state = "mup" Then
                    If FormMain.pct06File.Enabled = True Then
                        FormMain.pct06File.Image = My.Resources.blue_06norm
                    Else
                        FormMain.pct06File.Image = My.Resources.blue_06nouse
                    End If
                End If

            Case "volume"
                If state = "mute" Then FormMain.pct07Volume.Image = My.Resources.blue_07mute
                If state = "unmute" Then FormMain.pct07Volume.Image = My.Resources.blue_07unmute


                '' Stop Button actions to take depending on the variable 
            Case "power"
                If state = "enable" Then FormMain.pct08Power.Image = My.Resources.blue_08norm
                If state = "disable" Then FormMain.pct08Power.Image = My.Resources.blue_08nouse
                If state = "hover" Then
                    If FormMain.pct08Power.Enabled = True Then
                        FormMain.pct08Power.Image = My.Resources.blue_08glow 'Glow
                    Else
                        FormMain.pct08Power.Image = My.Resources.blue_08nouse
                    End If
                End If
                If state = "leave" Then
                    If FormMain.pct08Power.Enabled = True Then
                        FormMain.pct08Power.Image = My.Resources.blue_08norm
                    Else
                        FormMain.pct08Power.Image = My.Resources.blue_08nouse
                    End If
                End If

                If state = "mdown" Then FormMain.pct08Power.Image = My.Resources.blue_08nouse

                If state = "mup" Then
                    If FormMain.pct08Power.Enabled = True Then
                        FormMain.pct08Power.Image = My.Resources.blue_08norm
                    Else
                        FormMain.pct08Power.Image = My.Resources.blue_08nouse
                    End If
                End If
        End Select
    End Sub

#Region "Client Controls Settings"
    Public Sub SControlSettings()
        FormMain.pct01Back.Enabled = False
        FormMain.pct02Stop.Enabled = False
        FormMain.pct03Pause.Enabled = False
        FormMain.pct04Play.Enabled = False
        FormMain.pct05Next.Enabled = False
        WinInit.CreateHandlers()
    End Sub
    Public Sub SControlSettingsPlay()
        FormMain.pct01Back.Enabled = True
        FormMain.pct02Stop.Enabled = True
        FormMain.pct03Pause.Enabled = True
        FormMain.pct04Play.Enabled = True
        FormMain.pct04Play.Image = My.Resources.blue_04glow
        FormMain.pct05Next.Enabled = True
    End Sub

    Public Sub WControlSettings()
        FormMain.pct01Back.Enabled = True
        FormMain.pct02Stop.Enabled = True
        FormMain.pct03Pause.Enabled = True
        FormMain.pct04Play.Enabled = True
        FormMain.pct05Next.Enabled = True
        WinInit.CreateHandlers()
    End Sub

    Public Sub IControlSettings()
        FormMain.pct01Back.Enabled = True
        FormMain.pct02Stop.Enabled = True
        FormMain.pct03Pause.Enabled = True
        FormMain.pct04Play.Enabled = True
        FormMain.pct05Next.Enabled = True
        WinInit.CreateHandlers()
    End Sub

#End Region
End Module
